import Vue from 'vue'
import Echarts from 'vue-echarts'
import { use } from 'echarts/core'

// import ECharts modules manually to reduce bundle size
import {
  CanvasRenderer
} from 'echarts/renderers'
import {
  BarChart,
  LineChart,
  PieChart
} from 'echarts/charts' // 图表类型引入
import {
  GridComponent,
  TooltipComponent,
  TitleComponent,
  LegendComponent
} from 'echarts/components' // 图表内部小组件引入

use([
  PieChart, // 图表类型
  BarChart, // 图表类型
  LineChart, // 图表类型
  CanvasRenderer,
  GridComponent,
  TooltipComponent,
  TitleComponent,
  LegendComponent
])
Vue.use(Echarts)
Vue.component('v-chart', Echarts)
